﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Wicresoft.SMS.Web.Areas.history.Models;
using System.Web.Security;

namespace Wicresoft.SMS.Web.Areas.history.Controllers
{
    public class PendingController : Controller
    {
        //
        // GET: /home/pending
        public ViewResult Index()
        {
            //FormsAuthentication.SetAuthCookie(ul.UserName, false);

            LeftMenu p = new LeftMenu();
            p.link_history = "History(from ToString())";

            UserSetting user = new UserSetting();
            user.Alias = "aa";
            user.DisplayName = "AA";
            user.Password = "vvv";
            user.IsAdmin = true;
            user.selector = new List<string> { "1" , "2" };

            ViewData["set"] = user;

            return View(p);
        }

        //
        // GET: /home/pending/self
        [Authorize(Roles = "GroupUser,GroupAdmin,GlobalAdmin")]
        public ViewResult Self()
        {
            return View();
        }

        //
        // GET: /home/pending/group
        [Authorize(Roles = "GroupAdmin,GlobalAdmin")]
        public ViewResult Group()
        {
            return View();
        }
        
        //
        // GET: /home/pending/group
        [Authorize(Roles="GlobalAdmin")]
        public ViewResult Company()
        {
            return View();
        }

    }
}
